package com.huilian.tool.work.weixin.dto;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;

@Data
public class User implements Serializable {


    private static final long serialVersionUID = 377943585477256671L;

    private String userid;
    private String name;
    private String alias;
    private String mobile;
    private Integer[] department;
    private Integer[] order;
    private String position;
    private String gender;
    private String email;
    private String biz_mail;
    private Integer[] is_leader_in_dept;
    private String[] direct_leader;
    private Integer enable;
    private String avatar_mediaid;
    private String telephone;
    private String address;
    private Integer main_department;
    private Extattr extattr;
    private Boolean to_invite;
    private String external_position;
    private ExternalProfile external_profile;


    @Data
    public static class Extattr implements Serializable{

        private static final long serialVersionUID = 73135529270974876L;
        private ArrayList<Attrs> attrs;

        public Extattr(ArrayList<Attrs> attrs) {
            this.attrs = attrs;
        }
    }
    @Data
    public static class Attrs implements Serializable{
        private static final long serialVersionUID = -6596933018893784162L;
        private Integer type;
        private String name;
        private Text text;
        private Web web;
        private Miniprogram miniprogram;

        public Attrs(Integer type, String name, Text text) {
            this.type = type;
            this.name = name;
            this.text = text;
        }

        public Attrs(Integer type, String name, Web web) {
            this.type = type;
            this.name = name;
            this.web = web;
        }

        public Attrs(Integer type, String name, Miniprogram miniprogram) {
            this.type = type;
            this.name = name;
            this.miniprogram = miniprogram;
        }
        @Data
        public static class Text{
            private String value;

            public Text(String value) {
                this.value = value;
            }
        }
        @Data
        public static class Web{
            private String url;
            private String title;

            public Web(String url, String title) {
                this.url = url;
                this.title = title;
            }
        }
        @Data
        public static class Miniprogram{
            private String appid;
            private String pagepath;
            private String title;

            public Miniprogram(String appid, String pagepath, String title) {
                this.appid = appid;
                this.pagepath = pagepath;
                this.title = title;
            }
        }

    }
    @Data
    public static class ExternalProfile implements Serializable{
        private static final long serialVersionUID = 3263310922583695704L;
        private String external_corp_name;
        private WechatChannels wechat_channels;
        private Extattr external_attr;
        @Data
        public static class WechatChannels{
            private String nickname;

            public WechatChannels(String nickname) {
                this.nickname = nickname;
            }
        }

        public ExternalProfile(String external_corp_name, WechatChannels wechat_channels, Extattr external_attr) {
            this.external_corp_name = external_corp_name;
            this.wechat_channels = wechat_channels;
            this.external_attr = external_attr;
        }
    }




}
